package com.htl.线程.死锁;

public class Test {
    public static void main(String[] args) {
        DeadLockRunnable runnable1 = new DeadLockRunnable();
        runnable1.num = 1;
        DeadLockRunnable runnable2 = new DeadLockRunnable();
        runnable2.num = 2;
        new Thread(runnable1,"张三").start();

        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        new Thread(runnable2,"李四").start();

    }
}

